<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="/template.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core" >
    <ui:define name="title">
        <h:outputText value="#{bundle.CreateStatusTitle}"></h:outputText>
    </ui:define>
    <ui:define name="body">
        <h:form id="form" styleClass="form list" rendered="#{userController.allowedGroups('1,2')}">
            <p:fieldset legend="Status Creation" >
                <h:panelGrid columns="2" columnClasses="label,field"  styleClass="form_list">
                    <h:outputLabel value="Color:" />
                    <p:colorPicker id="popupCP" value="#{statusController.current.stsColor}"  widgetVar="picker"  required="true" requiredMessage="#{bundle.CreateStatusRequiredMessage_stsColor}"/>
                    <h:outputLabel value="Color Description:"   />
                    <p:inputText id="stsStatus" value="#{statusController.current.stsStatus}" title="#{bundle.CreateStatusTitle_stsStatus}" required="true" requiredMessage="#{bundle.CreateStatusRequiredMessage_stsStatus}"/>
                </h:panelGrid>

            <br />
            <p:commandButton ajax="false" action="#{statusController.create}" value="Save" process="@form" update="@form" />
            <p:commandButton ajax="false" action="#{statusController.prepareList}" value="Show All" immediate="true"/>
          </p:fieldset>
        </h:form>
    </ui:define>
</ui:composition>


